Skip to content

Instantly share code, notes, and snippets.

@Faria-Ejaz
Faria-Ejaz / Map.js
Last active May 9, 2024 18:09
react Leaflet Map with Auto-suggest Search #leaflet #react-leaflet #search
/** @format */
import { Map, TileLayer, Marker, Popup } from "react-leaflet";
import React, { useEffect, useState, useRef } from "react";
import { geosearch } from "esri-leaflet-geocoder";
import "leaflet/dist/leaflet.css";
import "esri-leaflet-geocoder/dist/esri-leaflet-geocoder.css";
import L from "leaflet";
function MapView(props) {
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 9, 2024 18:04
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@RubenSomsen
RubenSomsen / Silent_Payments.md
Last active May 9, 2024 18:02
Silent Payments – Receive private payments from anyone on a single static address without requiring any interaction or extra on-chain overhead

Silent Payments

Receive private payments from anyone on a single static address without requiring any interaction or extra on-chain overhead.

Update: This now has a BIP and WIP implementation

Overview

The recipient generates a so-called silent payment address and makes it publicly known. The sender then takes a public key from one of their chosen inputs for the payment, and uses it to derive a shared secret that is then used to tweak the silent payment address. The recipient detects the payment by scanning every transaction in the blockchain.

@ELI7VH
ELI7VH / react-context-boilerplate.tsx
Last active May 9, 2024 18:00
React Context Boiler Plate - Typescript
import React, { createContext, useContext, useState, useEffect } from "react"
type Props = {
children: React.ReactNode
}
type Context = {
count: number
increment: () => void
}
@Tosainu
Tosainu / cute_AA.txt
Last active May 9, 2024 17:56
顔文字詰め合わせ
あせ (・_・;) 顔文字
あせ (・∀・;) 顔文字
あせ (^ω^;;) 顔文字
あせ (゚∀゚ ;) 顔文字
あせ (゚∀゚ ;)タラー 顔文字
あたふた ヽ(´・ω・`ヽ) 顔文字
あつい (。>﹏<) 顔文字
あつい (。>﹏<)あㄘ”ゅい 顔文字
あつい (>﹏<。Ξ。>﹏<) 顔文字
あつい ι(´Д`υ) 顔文字
@smac89
smac89 / sparse.md
Created May 16, 2021 05:30
Git sparse checkout a folder from specific branch

The goal

Checkout the llvm folder from the release/11.x branch in https://github.com/llvm/llvm-project

My process

git init llvm-project
cd llvm-project
git remote add origin https://github.com/llvm/llvm-project
git fetch --depth=1
git config core.sparseCheckout true
@jh0ker
jh0ker / _readme.md
Last active May 9, 2024 17:54
Max attributes and skills in SCUM game single player

README

This script manipulates the SCUM database for the single player mode to increase the level of all skills and attributes to max (or the value of your choice) for a given prisoner. This script does not work for multiplayer characters.

You can edit the configuration settings SET_ATTRIBUTES and SET_SKILLS at the start of the script below to change the target values for the skills and attributes. Default is maxed out.

Tested with SCUM Build 0.9.101.72873

How do I use it?

@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 9, 2024 17:51
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@jberger
jberger / adduser.sh
Last active May 9, 2024 17:54
Create User Without Password
# create user with a disabled password
adduser myusername --disabled-password
# optionally login as them and create authorized_keys
# su - myusername
# mkdir --mode=0700 .ssh
# echo 'key' > .ssh/authorized_keys
# chmod 0600 .ssh/authorized_keys
# ^d
@petelacey
petelacey / one_drive.ex
Created February 24, 2024 23:02
Sample Elixir code to upload large documents to OneDrive via the MS Graph API
defmodule OneDrive
require Logger
@graph_api_url "https://graph.microsoft.com/v1.0/"
# The parent_drive_item is a Graph API driveItem object representing the root folder the file it to be uploaded to.
# There are many other representations left as an exercise to the reader
#
# The remote_file_path variable has the complete path to the file on the OneDrive side, e.g. /foo/bar/baz.txt
# If either the /foo or /bar folders are not already there, they will be created. They do not have to be created